package math;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 * TODO类描述
 *
 * @author liuteng
 * @version V1.0 2016-06-15
 * @createDate 2016-06-15 09:52:09
 * @modifyDate
 * @copyRight 亚信联创EC研发部
 */
public class SortUtils {
    public static void main(String[] args) {
        File file = new File("D:\\ideaWorkspace\\blend\\src\\main\\resources\\4G.dic");
        List<String> stringList = new ArrayList<String>();
        try {
            BufferedReader bufferedReader = new BufferedReader(new FileReader(file));
            String s= bufferedReader.readLine();
            while (s != null){
                stringList.add(s);
                //System.out.println(s);
                s= bufferedReader.readLine();
            }
            Collections.sort(stringList);
            for (String s1 : stringList) {
                System.out.println(s1);
            }
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    public static List<String> listSort(List<String> list) {
        return null;
    }
}
